home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 7603 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.1 KB

  1. Path: keats.ugrad.cs.ubc.ca!not-for-mail
  2. From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Can Windows DLL identify caller?
  5. Date: 25 Feb 1996 16:54:04 -0800
  6. Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
  7. Message-ID: <4gr0bcINNjv2@keats.ugrad.cs.ubc.ca>
  8. References: <NEWTNews.825272087.8651.jbarrett@westridg.demon.co.uk>
  9. NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
  10.  
  11. In article <NEWTNews.825272087.8651.jbarrett@westridg.demon.co.uk>,
  12. Jon A Barrett  <jbarrett@westridg.demon.co.uk> wrote:
  13. >
  14. >I've written a DLL in C that supplies 'secure' information to registered
  15. >programs. I have a relatively safe mechanism to ensure that the registered
  16. >programs have not been tampered with (checksums, image headers etc) but how
  17. >can I tell whose calling.
  18. >
  19. >Is there anyway that a DLL can identify something about the caller? Obviously
  20. >it will have to be something implicit, caller supplied parameters would be
  21. >open to abuse.
  22.  
  23. Also, note well: A shared library (or DLL, if you will) cannot really be
  24. trusted to protect sensitive information. It is not a protection domain.  To
  25. protect trusted information, you have to write a server which is accessed by
  26. message passing (e.g. internet datagrams), or put the information into your
  27. operating system kernel. Libraries that are mapped to the address space of the
  28. process usually do not offer adequate protection. For one thing, for the
  29. library to obtain the privileged information, it would have to somehow have a
  30. greater privilege than the client, so that it could then withhold the
  31. information from selected clients. But it cannot do this because it is not an
  32. autonomous service. It obtains its thread of control from the caller, and
  33. inherits privileges from the caller.  It is, for all intents and purposes, a
  34. library and nothing more.
  35.  
  36. >Any clues would be gratefully received.
  37.  
  38. You definitely need to get some. The platform you are using may itself be
  39. inappropriate to what you are trying to do, as well as the overall approach.
  40. I can't tell---the term DLL is used not only under Windows but elsewhere.
  41. -- 
  42.  
  43.